<!--
本代码演示如何获取真正的DOM
使用ref属性
在代码中通过refs来获取
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>React learn</title>
    <script src="build/react.js"></script>
    <script src="build/react-dom.js"></script>
    <script src="build/browser.min.js"></script>
</head>
<body>
    <div id="hello"></div>
    <div id="map"></div>
    <script type="text/babel">
       var HelloMessage = React.createClass({
           handleClick:function(){
               this.refs.input.focus();
           },
           render:function() {
               return (<div><input type="text" ref="input"/>
                            <input type="button" value="文本焦点" onClick={this.handleClick}/>
               </div>);
           },

       });
        ReactDOM.render(
                <HelloMessage/>,
               document.getElementById("hello")
        );

    </script>
</body>
</html>